Untag more efficiently if USE_LSB_TAG.
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 9 May 2012 17:51:30 +0000 (10:51 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 9 May 2012 17:51:30 +0000 (10:51 -0700)
commit7041db25aa1b7cd455a7479ee45f7fbb9c0ad8fa
treeb43bc4d81913fee4f049dd4bdf4b37f4dce15e4d
parenta244a3dff4f390cbacd65fcda1c3dbad9de9e9b0
Untag more efficiently if USE_LSB_TAG.

This is based on a proposal by YAMAMOTO Mitsuharu in
<http://lists.gnu.org/archive/html/emacs-devel/2008-01/msg01876.html>.
For an admittedly artificial (nth 8000 longlist) benchmark on
Fedora 15 x86-64, this yields a 25% CPU speedup.  Also, it shrinks
Emacs's overall text size by 1%.
* lisp.h (XUNTAG): New macro.
(XCONS, XVECTOR, XSTRING, XSYMBOL, XFLOAT, XMISC, XPROCESS, XWINDOW)
(XTERMINAL, XSUBR, XBUFFER, XCHAR_TABLE, XSUB_CHAR_TABLE, XBOOL_VECTOR)
(XSETTYPED_PSEUDOVECTOR, XHASH_TABLE, TYPED_PSEUDOVECTORP): Use it.
* eval.c (Fautoload):
* font.h (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT):
* frame.h (XFRAME): Use XUNTAG.
src/ChangeLog
src/eval.c
src/font.h
src/frame.h
src/lisp.h